{% extends "base.html" %}
{% load static %}
{% load crispy_forms_tags %}

{% block title %}
Teacher Dashboard | {{ block.super }}
{% endblock title %}

{% block stylesheets %}
{{ block.super }}
<!-- Custom styles for this template-->
<link rel="stylesheet" href="{% static "laioffer/css/dashboard.css" %}">
<link rel="stylesheet" href="{% static "bootstrap-calendar/css/calendar.css" %}">
<link rel="stylesheet" href="{% static "bootstrap-calendar/css/custom.css" %}">
{% endblock stylesheets %}

{% block content %}

{% if request.user.current_group == "Teacher" %}
{% include "_teacher_sidebar.html" %}
{% elif request.user.current_group == "Supervisor" %}
{% include "_admin_sidebar.html" %}
{% endif %}

<section id="main-content">
    <section class="wrapper">
        <div class="table-agile-info">
            <div class="panel panel-default">
                <section class="panel-heading">{{ view.section_title }}</section>
                {% include "_message.html" %}

                course teach url:<a href='{{ view.course.course_teach_url }}'>{{ view.course.course_teach_url }}</a>
                course zone:{{ view.course.course_zone }}
                <div class="page-header">
                    <div class="pull-right form-inline">
                        <div class="btn-group">
                            <button class="btn btn-primary" data-calendar-nav="prev"><< Prev</button>
                            <button class="btn btn-default" data-calendar-nav="today">Today</button>
                            <button class="btn btn-primary" data-calendar-nav="next">Next >></button>
                        </div>
                        <div class="btn-group">
                            <button class="btn btn-warning" data-calendar-view="year">Year</button>
                            <button class="btn btn-warning" data-calendar-view="month">Month</button>
                            <button class="btn btn-warning" data-calendar-view="week">Week</button>
                            <button class="btn btn-warning" data-calendar-view="day">Day</button>
                        </div>
                    </div>

                    <h3></h3>
                </div>

                <div id="calendar"></div>

                <div class="well">
                    <h4>Activities</h4>
                    <ul id="eventlist" class="nav nav-list"></ul>
                </div>

            </div>
        </div>
    </section> <!-- /wrapper -->
</section> <!-- /main-content -->

{% endblock content %}

{% block javascripts %}
{{ block.super }}
<script type="text/javascript" src="{% static "bootstrap-calendar/js/underscore.js" %}"></script>
<script type="text/javascript" src="{% static "bootstrap-calendar/js/calendar.js" %}"></script>
<script type="text/javascript">
    $.py = {};
    // py.course_id = {{ view.course.id }};
    $.py.get_modules_url = '{% url "course:get_modules" view.course.id %}';
    $.py.add_lecture_url = '/course/' + {{ view.course.id }} + '/lecture/';
    $.py.add_exam_url = '/course/' + {{ view.course.id }} + '/exam/';
    $.py.append_add_module_link = true;
</script>
<script type="text/javascript" src="{% static "bootstrap-calendar/js/custom.js" %}"></script>
{% endblock javascripts %}
